<?php
$tdatatbl_video=array();
	$tdatatbl_video[".NumberOfChars"]=80; 
	$tdatatbl_video[".ShortName"]="tbl_video";
	$tdatatbl_video[".OwnerID"]="";
	$tdatatbl_video[".OriginalTable"]="tbl_video";


	
//	field labels
$fieldLabelstbl_video = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelstbl_video["English"]=array();
	$fieldToolTipstbl_video["English"]=array();
	$fieldLabelstbl_video["English"]["id"] = "Id";
	$fieldToolTipstbl_video["English"]["id"] = "";
	$fieldLabelstbl_video["English"]["hinh_anh"] = "Hinh Anh";
	$fieldToolTipstbl_video["English"]["hinh_anh"] = "";
	$fieldLabelstbl_video["English"]["ten_file"] = "Ten File";
	$fieldToolTipstbl_video["English"]["ten_file"] = "";
	$fieldLabelstbl_video["English"]["ten_video"] = "Ten Video";
	$fieldToolTipstbl_video["English"]["ten_video"] = "";
	$fieldLabelstbl_video["English"]["hien_len_trang_chu"] = "Hien Len Trang Chu";
	$fieldToolTipstbl_video["English"]["hien_len_trang_chu"] = "";
	if (count($fieldToolTipstbl_video["English"])){
		$tdatatbl_video[".isUseToolTips"]=true;
	}
}


	
	$tdatatbl_video[".NCSearch"]=true;

	

$tdatatbl_video[".shortTableName"] = "tbl_video";
$tdatatbl_video[".nSecOptions"] = 0;
$tdatatbl_video[".recsPerRowList"] = 1;	
$tdatatbl_video[".tableGroupBy"] = "0";
$tdatatbl_video[".mainTableOwnerID"] = "";
$tdatatbl_video[".moveNext"] = 1;




$tdatatbl_video[".showAddInPopup"] = false;

$tdatatbl_video[".showEditInPopup"] = false;

$tdatatbl_video[".showViewInPopup"] = false;


$tdatatbl_video[".fieldsForRegister"] = array();

$tdatatbl_video[".listAjax"] = false;

	$tdatatbl_video[".audit"] = false;

	$tdatatbl_video[".locking"] = false;
	
$tdatatbl_video[".listIcons"] = true;
$tdatatbl_video[".edit"] = true;
$tdatatbl_video[".inlineEdit"] = true;
$tdatatbl_video[".view"] = true;

$tdatatbl_video[".exportTo"] = true;

$tdatatbl_video[".printFriendly"] = true;

$tdatatbl_video[".delete"] = true;

$tdatatbl_video[".showSimpleSearchOptions"] = false;

$tdatatbl_video[".showSearchPanel"] = true;


$tdatatbl_video[".isUseAjaxSuggest"] = true;

$tdatatbl_video[".rowHighlite"] = true;


// button handlers file names

$tdatatbl_video[".addPageEvents"] = false;

$tdatatbl_video[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatatbl_video[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatatbl_video[".isUseTimeForSearch"] = false;

$tdatatbl_video[".isUseiBox"] = false;



$tdatatbl_video[".isUseInlineAdd"] = true;

$tdatatbl_video[".isUseInlineEdit"] = true;
$tdatatbl_video[".isUseInlineJs"] = $tdatatbl_video[".isUseInlineAdd"] || $tdatatbl_video[".isUseInlineEdit"];

$tdatatbl_video[".allSearchFields"] = array();

$tdatatbl_video[".globSearchFields"][] = "hinh_anh";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("hinh_anh", $tdatatbl_video[".allSearchFields"]))
{
	$tdatatbl_video[".allSearchFields"][] = "hinh_anh";	
}
$tdatatbl_video[".globSearchFields"][] = "ten_file";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_file", $tdatatbl_video[".allSearchFields"]))
{
	$tdatatbl_video[".allSearchFields"][] = "ten_file";	
}
$tdatatbl_video[".globSearchFields"][] = "ten_video";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_video", $tdatatbl_video[".allSearchFields"]))
{
	$tdatatbl_video[".allSearchFields"][] = "ten_video";	
}
$tdatatbl_video[".globSearchFields"][] = "hien_len_trang_chu";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("hien_len_trang_chu", $tdatatbl_video[".allSearchFields"]))
{
	$tdatatbl_video[".allSearchFields"][] = "hien_len_trang_chu";	
}


$tdatatbl_video[".googleLikeFields"][] = "id";
$tdatatbl_video[".googleLikeFields"][] = "hinh_anh";
$tdatatbl_video[".googleLikeFields"][] = "ten_file";
$tdatatbl_video[".googleLikeFields"][] = "ten_video";
$tdatatbl_video[".googleLikeFields"][] = "hien_len_trang_chu";



$tdatatbl_video[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatatbl_video[".allSearchFields"])) 
{
	$tdatatbl_video[".allSearchFields"][] = "id";	
}
$tdatatbl_video[".advSearchFields"][] = "hinh_anh";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("hinh_anh", $tdatatbl_video[".allSearchFields"])) 
{
	$tdatatbl_video[".allSearchFields"][] = "hinh_anh";	
}
$tdatatbl_video[".advSearchFields"][] = "ten_file";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_file", $tdatatbl_video[".allSearchFields"])) 
{
	$tdatatbl_video[".allSearchFields"][] = "ten_file";	
}
$tdatatbl_video[".advSearchFields"][] = "ten_video";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_video", $tdatatbl_video[".allSearchFields"])) 
{
	$tdatatbl_video[".allSearchFields"][] = "ten_video";	
}
$tdatatbl_video[".advSearchFields"][] = "hien_len_trang_chu";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("hien_len_trang_chu", $tdatatbl_video[".allSearchFields"])) 
{
	$tdatatbl_video[".allSearchFields"][] = "hien_len_trang_chu";	
}

$tdatatbl_video[".isTableType"] = "list";


	

$tdatatbl_video[".isDisplayLoading"] = true;

$tdatatbl_video[".isResizeColumns"] = false;





$tdatatbl_video[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatatbl_video[".strOrderBy"] = $gstrOrderBy;
	
$tdatatbl_video[".orderindexes"] = array();

$tdatatbl_video[".sqlHead"] = "SELECT id,  hinh_anh,  ten_file,  ten_video,  hien_len_trang_chu";
$tdatatbl_video[".sqlFrom"] = "FROM tbl_video";
$tdatatbl_video[".sqlWhereExpr"] = "";
$tdatatbl_video[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatatbl_video[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatatbl_video[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatatbl_video[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "tbl_video";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				
		
				
		
		
		
			$tdatatbl_video["id"]=$fdata;
//	hinh_anh
	$fdata = array();
	$fdata["strName"] = "hinh_anh";
	$fdata["ownerTable"] = "tbl_video";
		$fdata["Label"]="Hinh Anh"; 
	
		
		$fdata["LinkPrefix"]="upload/"; 
	
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Document upload";
	$fdata["ViewFormat"]= "Document Download";
	
		
		
		
		
		
	$fdata["GoodName"]= "hinh_anh";
	
		$fdata["FullName"]= "hinh_anh";
	
		
		
		
		
		
			$fdata["UploadFolder"]="upload"; 
		$fdata["Index"]= 2;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_video["hinh_anh"]=$fdata;
//	ten_file
	$fdata = array();
	$fdata["strName"] = "ten_file";
	$fdata["ownerTable"] = "tbl_video";
		$fdata["Label"]="Ten File"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ten_file";
	
		$fdata["FullName"]= "ten_file";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=200";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_video["ten_file"]=$fdata;
//	ten_video
	$fdata = array();
	$fdata["strName"] = "ten_video";
	$fdata["ownerTable"] = "tbl_video";
		$fdata["Label"]="Ten Video"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ten_video";
	
		$fdata["FullName"]= "ten_video";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=200";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_video["ten_video"]=$fdata;
//	hien_len_trang_chu
	$fdata = array();
	$fdata["strName"] = "hien_len_trang_chu";
	$fdata["ownerTable"] = "tbl_video";
		$fdata["Label"]="Hien Len Trang Chu"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "hien_len_trang_chu";
	
		$fdata["FullName"]= "hien_len_trang_chu";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_video["hien_len_trang_chu"]=$fdata;

	
$tables_data["tbl_video"]=&$tdatatbl_video;
$field_labels["tbl_video"] = &$fieldLabelstbl_video;
$fieldToolTips["tbl_video"] = &$fieldToolTipstbl_video;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["tbl_video"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["tbl_video"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  hinh_anh,  ten_file,  ten_video,  hien_len_trang_chu";
$proto0["m_strFrom"] = "FROM tbl_video";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto1=array();
$proto1["m_sql"] = "";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto1["m_column"]=$obj;
$proto1["m_contained"] = array();
$proto1["m_strCase"] = "";
$proto1["m_havingmode"] = "0";
$proto1["m_inBrackets"] = "0";
$proto1["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto1);

$proto0["m_where"] = $obj;
$proto3=array();
$proto3["m_sql"] = "";
$proto3["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto3["m_column"]=$obj;
$proto3["m_contained"] = array();
$proto3["m_strCase"] = "";
$proto3["m_havingmode"] = "0";
$proto3["m_inBrackets"] = "0";
$proto3["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto3);

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto5=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "tbl_video"
));

$proto5["m_expr"]=$obj;
$proto5["m_alias"] = "";
$obj = new SQLFieldListItem($proto5);

$proto0["m_fieldlist"][]=$obj;
						$proto7=array();
			$obj = new SQLField(array(
	"m_strName" => "hinh_anh",
	"m_strTable" => "tbl_video"
));

$proto7["m_expr"]=$obj;
$proto7["m_alias"] = "";
$obj = new SQLFieldListItem($proto7);

$proto0["m_fieldlist"][]=$obj;
						$proto9=array();
			$obj = new SQLField(array(
	"m_strName" => "ten_file",
	"m_strTable" => "tbl_video"
));

$proto9["m_expr"]=$obj;
$proto9["m_alias"] = "";
$obj = new SQLFieldListItem($proto9);

$proto0["m_fieldlist"][]=$obj;
						$proto11=array();
			$obj = new SQLField(array(
	"m_strName" => "ten_video",
	"m_strTable" => "tbl_video"
));

$proto11["m_expr"]=$obj;
$proto11["m_alias"] = "";
$obj = new SQLFieldListItem($proto11);

$proto0["m_fieldlist"][]=$obj;
						$proto13=array();
			$obj = new SQLField(array(
	"m_strName" => "hien_len_trang_chu",
	"m_strTable" => "tbl_video"
));

$proto13["m_expr"]=$obj;
$proto13["m_alias"] = "";
$obj = new SQLFieldListItem($proto13);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto15=array();
$proto15["m_link"] = "SQLL_MAIN";
			$proto16=array();
$proto16["m_strName"] = "tbl_video";
$proto16["m_columns"] = array();
$proto16["m_columns"][] = "id";
$proto16["m_columns"][] = "hinh_anh";
$proto16["m_columns"][] = "ten_file";
$proto16["m_columns"][] = "ten_video";
$proto16["m_columns"][] = "hien_len_trang_chu";
$obj = new SQLTable($proto16);

$proto15["m_table"] = $obj;
$proto15["m_alias"] = "";
$proto17=array();
$proto17["m_sql"] = "";
$proto17["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto17["m_column"]=$obj;
$proto17["m_contained"] = array();
$proto17["m_strCase"] = "";
$proto17["m_havingmode"] = "0";
$proto17["m_inBrackets"] = "0";
$proto17["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto17);

$proto15["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto15);

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$obj = new SQLQuery($proto0);

$queryData_tbl_video = $obj;
$tdatatbl_video[".sqlquery"] = $queryData_tbl_video;

$tableEvents["tbl_video"] = new eventsBase;

?>
